<{include file="common/header"}>
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="bg"></div>
<div class="container">
    <div class="line bouncein">
        <div class="xs6 xm4 xs3-move xm4-move">
            <div style="height:100px;"></div>
            <div class="media media-y margin-big-bottom">
            </div>
            <form action="<{:url('loginFile')}>" method="post">
                <div class="panel loginbox">
                    <div class="text-center margin-big padding-big-top"><h1>后台密码修改</h1></div>
                    <div class="panel-body" style="padding:30px; padding-bottom:10px; padding-top:10px;">
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="text" class="input input-big logincount" name="uname" value="<{$uname}>"  placeholder="请输入账号" data-validate="required:请填写账号" readonly />
                                <span class="icon icon-user margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="password" class="input input-big " name="old_pwd" value=""  placeholder="请输入原密码" data-validate="required:请填写原密码" />
                                <span class="icon icon-key margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="password" class="input input-big " name="new_pwd" value=""  placeholder="请输入修改密码" data-validate="required:请填写修改密码" />
                                <span class="icon icon-key margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                    <{if !empty($email)}>
                                <input type="email" class="input input-big email " name="email" value="<{$email}>"  placeholder="请输入邮箱" data-validate="required:请填写邮箱"  readonly />
                                <{else/}>
                                <input type="email" class="input input-big email " name="email" value="<{$email}>"  placeholder="请输入邮箱" data-validate="required:请填写邮箱"  />
                                <{/if}>
                                <span class="icon icon-envelope margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="number" class=" input-big  yzm " name="yzm" value=""  placeholder="输入验证码" data-validate="required:请填写验证码"  />
                                <button class="button input-big btn" style="float: right; "  type="button">发送验证码</button>
                            </div>
                        </div>
                    </div>
                    <div style="padding:30px;"><input type="submit" class="button button-block bg-main text-big input-big "  value="确定"></div>

                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<script>
    $('.btn').click(function () {
        var email=$('.email').val();
        $.ajax({
            type:'post',
            url:"<{:url('login/ajaxFile')}>",
            data:{email:email},
            success:function (response) {
                console.log(response)
                   if(response==1){
                     $('.btn').prop('disabled',true) ;
                   }else{
                     $('.btn').prop('disabled',false) ;
                }
            }
        })
    })
    $('.yzm').keydown(function () {
        $('.btn').prop('disabled',false) ;
    })
</script>
